<import file="block/common.html" name="url"/>
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-body ">
                <blockquote class="layui-elem-quote">当前角色：<b style="color: red;"><{$info['groupname']}></b> (需要配合菜单权限进行分配)，修改当前角色系统权限、栏目权限或菜单权限后，需要用户重新登录才会生效！</blockquote>
            </div>
        </div>
    </div>
</div>	
<div class="layui-form">
<form class="layui-form" action="">
<fieldset class="layui-elem-field">
  <legend>系统管理</legend>
  <div class="layui-field-box">
   <div class="layui-form-item">
    <label class="layui-form-label">后台管理</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="index_index" title="后台进入" <?php echo sysRoC("index_index",$systemrole);?> checked="" disabled="">
      <input type="checkbox" name="systemrole[]" value="index_home" title="主页查看" <?php echo sysRoC("index_home",$systemrole);?> checked="" disabled="">
      
    </div>
  </div>
   

  <div class="layui-form-item">
    <label class="layui-form-label">系统菜单</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="adminmenu_index" title="列表" <?php echo sysRoC("adminmenu_index",$systemrole);?>>
	    <input type="checkbox" name="systemrole[]" value="adminmenu_add" title="添加" <?php echo sysRoC("adminmenu_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="adminmenu_edit" title="编辑" <?php echo sysRoC("adminmenu_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="adminmenu_del" title="删除" <?php echo sysRoC("adminmenu_del",$systemrole);?>>
    </div>
    <div class="layui-form-mid layui-word-aux">如进行非内容管理的权限操作，需要勾选  “系统菜单->列表”选项！</div>
  </div>
<div class="layui-form-item">
    <label class="layui-form-label">系统设置</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="system_index" title="查看" <?php echo sysRoC("system_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="system_edit" title="编辑" <?php echo sysRoC("system_edit",$systemrole);?>>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">缓存管理</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="cache_index" title="列表" <?php echo sysRoC("cache_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="cache_delRedisCache" title="清除Redis缓存" <?php echo sysRoC("cache_delRedisCache",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="cache_delFileCache" title="清除文件缓存" <?php echo sysRoC("cache_delFileCache",$systemrole);?>>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">上传权限</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="upload_imgUpload" title="表单图片上传" <?php echo sysRoC("upload_imgUpload",$systemrole);?>>      
      <input type="checkbox" name="systemrole[]" value="upload_tinymceUpload" title="编辑器图片上传" <?php echo sysRoC("upload_tinymceUpload",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="upload_attmentUpload" title="表单附件上传" <?php echo sysRoC("upload_attmentUpload",$systemrole);?>>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">附件管理</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="attment_index" title="列表" <?php echo sysRoC("attment_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="attment_del" title="删除" <?php echo sysRoC("attment_del",$systemrole);?>>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">系统公告</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="notice_index" title="列表" <?php echo sysRoC("notice_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="notice_add" title="添加" <?php echo sysRoC("notice_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="notice_edit" title="编辑" <?php echo sysRoC("notice_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="notice_del" title="删除" <?php echo sysRoC("notice_del",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="notice_switchStatus" title="状态切换" <?php echo sysRoC("notice_switchStatus",$systemrole);?>>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">网站访问量</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="visit_index" title="图形化展示" <?php echo sysRoC("visit_index",$systemrole);?>>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">操作日志</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="log_index" title="查看日志" <?php echo sysRoC("log_index",$systemrole);?>>
    </div>
  </div>  
</div>
</fieldset>
<fieldset class="layui-elem-field">
  <legend>内容管理</legend>
  <div class="layui-field-box">
   <div class="layui-form-item">
    <label class="layui-form-label">栏目管理</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="contentcate_index" title="列表" <?php echo sysRoC("contentcate_index",$systemrole);?>>
	    <input type="checkbox" name="systemrole[]" value="contentcate_add" title="添加" <?php echo sysRoC("contentcate_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="contentcate_edit" title="编辑" <?php echo sysRoC("contentcate_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="contentcate_del" title="删除" <?php echo sysRoC("contentcate_del",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="content_cate_all" title="列表不受用户限制" <?php echo sysRoC("content_cate_all",$systemrole);?>>
    </div>
    <div class="layui-form-mid layui-word-aux">1、如需要进行内容管理权限分配，一定要勾选  “栏目管理->列表” 才能正常使用；  2、如当前角色需要查看本级栏目其它成员发布文章，请勾选 “列表不受用户限制”。</div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">内容管理</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="content_index" title="列表" <?php echo sysRoC("content_index",$systemrole);?>>
	    <input type="checkbox" name="systemrole[]" value="content_add" title="添加" <?php echo sysRoC("content_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="content_edit" title="编辑" <?php echo sysRoC("content_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="content_attribute" title="属性" <?php echo sysRoC("content_attribute",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="content_status" title="发布" <?php echo sysRoC("content_status",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="content_switchstatus" title="状态切换" <?php echo sysRoC("content_switchStatus",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="content_del" title="删除" <?php echo sysRoC("content_del",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="index_articlecount" title="后台显示统计图表" <?php echo sysRoC("index_articlecount",$systemrole);?>>
    </div>
  </div>
  </div>
</fieldset>
<fieldset class="layui-elem-field">
  <legend>后台用户管理</legend>
  <div class="layui-field-box">
   <div class="layui-form-item">
    <label class="layui-form-label">角色管理</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="admingroup_index" title="列表" <?php echo sysRoC("admingroup_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="admingroup_add" title="添加" <?php echo sysRoC("admingroup_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="admingroup_edit" title="编辑" <?php echo sysRoC("admingroup_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="admingroup_del" title="删除" <?php echo sysRoC("admingroup_del",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="admingroup_systemrole" title="系统权限编辑" <?php echo sysRoC("admingroup_systemrole",$systemrole);?>>
	    <input type="checkbox" name="systemrole[]" value="admingroup_channlrole" title="栏目权限编辑" <?php echo sysRoC("admingroup_channlrole",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="admingroup_menurole" title="系统菜单编辑" <?php echo sysRoC("admingroup_menurole",$systemrole);?>>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">管理员管理</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="adminuser_index" title="列表" <?php echo sysRoC("adminuser_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="adminuser_add" title="添加" <?php echo sysRoC("adminuser_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="adminuser_edit" title="编辑" <?php echo sysRoC("adminuser_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="adminuser_del" title="删除" <?php echo sysRoC("adminuser_del",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="adminuser_switchStatus" title="状态切换" <?php echo sysRoC("adminuser_switchStatus",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="adminuser_passwordedit" title="用户自主修改密码" <?php echo sysRoC("adminuser_passwordedit",$systemrole);?>>
    </div>
  </div>
  </div>
</fieldset>
<fieldset class="layui-elem-field">
  <legend>扩展功能</legend>
  <div class="layui-field-box">
   <div class="layui-form-item">
    <label class="layui-form-label">值班安排</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="onduty_index" title="列表" <?php echo sysRoC("onduty_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="onduty_add" title="添加" <?php echo sysRoC("onduty_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="onduty_edit" title="编辑" <?php echo sysRoC("onduty_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="onduty_del" title="删除" <?php echo sysRoC("onduty_del",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="onduty_switchStatus" title="状态切换" <?php echo sysRoC("onduty_switchStatus",$systemrole);?>>
    </div>
  </div>
  
  <div class="layui-form-item">
    <label class="layui-form-label">图集功能</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="image_index" title="图集列表" <?php echo sysRoC("image_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="image_add" title="添加" <?php echo sysRoC("image_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="image_edit" title="编辑" <?php echo sysRoC("image_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="image_del" title="删除" <?php echo sysRoC("image_del",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="image_switchStatus" title="状态切换" <?php echo sysRoC("image_switchStatus",$systemrole);?>>
    </div>
	<div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="imageinfo_index" title="图文列表" <?php echo sysRoC("imageinfo_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="imageinfo_add" title="添加" <?php echo sysRoC("imageinfo_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="imageinfo_edit" title="编辑" <?php echo sysRoC("imageinfo_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="imageinfo_del" title="删除" <?php echo sysRoC("imageinfo_del",$systemrole);?>>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">领导信息</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="member_index" title="列表" <?php echo sysRoC("member_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="member_add" title="添加" <?php echo sysRoC("member_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="member_edit" title="编辑" <?php echo sysRoC("member_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="member_del" title="删除" <?php echo sysRoC("member_del",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="member_switchStatus" title="状态切换" <?php echo sysRoC("member_switchStatus",$systemrole);?>>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">意见反馈</label>
    <div class="layui-input-block">
      <input type="checkbox" name="systemrole[]" value="feedback_index" title="列表" <?php echo sysRoC("feedback_index",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="feedback_add" title="添加" <?php echo sysRoC("feedback_add",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="feedback_edit" title="编辑" <?php echo sysRoC("feedback_edit",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="feedback_del" title="删除" <?php echo sysRoC("feedback_del",$systemrole);?>>
      <input type="checkbox" name="systemrole[]" value="feedback_switchStatus" title="状态切换" <?php echo sysRoC("feedback_switchStatus",$systemrole);?>>
    </div>
  </div>
  </div>
</fieldset>
<div class="layui-form-item">
    <div class="layui-input-block">
      <input type="hidden" name="id" value="<{$info['id']}>">
      <button class="layui-btn" lay-submit lay-filter="saveBtn"><?php echo lang('save');?></button>
    </div>
</div>
</form>
</div>
</div>
<script>
    layui.use(['form'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.$;
		form.render();

    form.on('submit(saveBtn)', function (data) {
			$.post('<{caUrl("admingroup","systemrole")}>',data.field,function(res){
                if(res.status == 1){
                    layer.msg(res.info, {icon: 1, time: 1000},function(){
						loadMain('<{caUrl("admingroup","index")}>');
					});
                }else{
                    layer.msg(res.info, {icon: 2, anim: 6, time: 5000});
                }
            });
            return false;
        });
    });
</script>